<script setup lang="ts">
import TestCom from '@/components/TestCom.vue'
import { ref } from 'vue'
const usernameFather = ref<string>('father')
const getV = (v: string) => {
  usernameFather.value = v
}
</script>

<template>
  <div class="article-page">
    article

    <!-- 我希望TestCom组件中输入框的值，和父组件中的响应式数据usernameFather进行双向数据绑定 -->
    <!-- <TestCom v-model="usernameFather"></TestCom> -->
    <TestCom :model-value="usernameFather" @update:model-value="getV"></TestCom>
  </div>
</template>

<style lang="scss" scoped></style>
